﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ReBasic.Model
{
    public class SortTerm : IComparable<SortTerm>
    {
        public string term;
        public int bg, ed;

        public SortTerm(string s, int b, int e)
        {
            term = s;
            bg = b;
            ed = e;
        }

        #region IComparable<SortTerm> 成员

        public int CompareTo(SortTerm other)
        {
            if (bg == other.bg)
                return -(ed.CompareTo(other.ed));
            return bg.CompareTo(other.bg);
        }

        #endregion
    }
}
